package com.ddyx.service.product.api.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * <p>
 * 商品
 * </p>
 *
 * @author agula
 * @since 2019-08-06
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "商品对象", description = "商品数据封装对象")
public class GoodsVo implements Serializable {

    private static final long serialVersionUID=1L;

    @NotNull(message = "品牌ID不能为空")
    @ApiModelProperty(value = "品牌ID", dataType = "int", required = true, example = "241")
    private Integer brandId;


    @NotNull(message = "类目ID不能为空")
    @ApiModelProperty(value = "类目ID", dataType = "int", required = true, example = "42")
    private Integer categoryId;


    @NotBlank(message = "商品名称不能为空")
    @ApiModelProperty(value = "商品名称", dataType = "string", required = true, example = "商品名称")
    private String goodsName;


    @NotBlank(message = "商品编码不能为空")
    @ApiModelProperty(value = "商品编码",  dataType = "string", required = true, example = "商品编码")
    private String goodsCode;

    @ApiModelProperty(value = "商品描述",  dataType = "string", required = true, example = "商品描述")
    private String goodsDesc;

    @NotBlank(message = "sku编码不能为空")
    @ApiModelProperty(value = "商品sku编码", dataType = "string", required = true, example = "商品sku编码")
    private String spuCode;

    @ApiModelProperty(value = "SPU外部编码", dataType = "string", required = true, example = "SPU外部编码")
    private String spuOuterId;


    @Override
    public String toString() {
        return "Goods{" +
        ", brandId=" + brandId +
        ", categoryId=" + categoryId +
        ", goodsName=" + goodsName +
        ", goodsCode=" + goodsCode +
        ", goodsDesc=" + goodsDesc +
        ", spuCode=" + spuCode +
        ", spuOuterId=" + spuOuterId +
        "}";
    }
}
